package com.pucong.gitee.database.backup.common.entity.redis.dto;

import com.pucong.gitee.database.backup.common.selfenum.RedisDataType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ApiModel("redis 新增key dto")
public class RedisKeyAddDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull
    @ApiModelProperty("库")
    private int index;

    @NotNull
    @ApiModelProperty("数据类型")
    private RedisDataType type;

    @ApiModelProperty("key")
    private String key;

    @ApiModelProperty("newVal")
    private String val;

    @ApiModelProperty("value 时长")
    private double score;

    @ApiModelProperty("key 有效期")
    private int time;

}
